Conversation
WalkthroughThe cleanup deletion logic in the Database adapter was refactored to pre-construct a Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @src/Audit/Adapter/Database.php:
- Around line 387-395: The Query::orderAsc() call in the $queries array is
invalid because it requires an attribute; update the query list used before
deleteDocuments by either removing Query::orderAsc() if only ordering by time
descending is intended, or replace it with Query::orderAsc('time') to use a
secondary ascending sort on the same attribute; the change should be made where
the $queries array is built (the entries including Query::select(...),
Query::lessThan('time', $datetimeString), Query::orderDesc('time'),
Query::orderAsc()) so the composed queries comply with utopia-php/database v4
API.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/Audit/Adapter/Database.php
🧰 Additional context used
🧬 Code graph analysis (1)
src/Audit/Adapter/Database.php (1)
src/Audit/Adapter/SQL.php (1)
getCollectionName(24-27)
🔇 Additional comments (1)
src/Audit/Adapter/Database.php (1)
388-389: LGTM on the select projection and time filter.The select projection appropriately limits the fields to essential document metadata and the
timefield needed for the filter. This is a sensible optimization for batch deletion operations.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.